

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
	public static void main(String[] argv) throws IOException {
		ServerSocket server = new ServerSocket(9090);
		System.out.println("create server at 9090");
		while(true) {
			Socket client = server.accept();
			client.getOutputStream().write("server".getBytes());
			System.out.println("on client connect");
			try {
				Thread.currentThread().sleep(2000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			client.close();
		}
		
		
	}
}
